<h1>New Game Form</h1>
<?php


  print Form::open('games/create', 'POST');
  $categories = Category::LoadCategories();

  $options = array();
  $index = 1;
  foreach($categories as $category)
  {
    $options[$index++] = $category->title;
  }
  
?>
<p>
<?php
  print Form::label('category', 'Category Name:') . '<br/>';
  print Form::select('category', $options, '1');
?>
</p>
<p>
<?php
  print Form::label('name', 'Game Name: (lower_case)') . '<br/>';
  print Form::text('name');
?>
</p>
<p>
<?php
  print Form::label('title', 'Game Title:') . '<br/>';
  print Form::text('title');
?>
</p>
<p>
<?php
  print Form::label('title', 'ImageID:') . '<br/>';
  print Form::text('imageId', 20001 + Game::GetLastGameId());
?>
</p>

<p>
<?php
  print Form::submit('Add game');
?>
</p>
<?php   print Form::close();?>

 













<?php

//$sql = 'CREATE TABLE IF NOT EXISTS users('
//  . ' id int(10) NOT NULL AUTO_INCREMENT,'
//  . ' nick_name varchar(50) CHARACTER SET latin1 DEFAULT NULL,'
//  . ' email varchar(30) CHARACTER SET latin1 NOT NULL,'
//  . ' password varchar(32) NOT NULL,'
//  . ' type varchar(30) DEFAULT NULL,'
//  . ' facebook_id text,'
//  . ' registration_date datetime DEFAULT NULL,'
//  . ' PRIMARY KEY (id),'
//  . ' KEY username (email)'
//. ') ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;';
//
//
//$succes = DB::query($sql);
//print $succes;
?>